# -*- coding: utf-8 -*-
"""
Created on Tue Oct 04 16:25:10 2016

@author: jockeyyan
"""

from pymongo import MongoClient
import gridfs

db = MongoClient(host="172.16.0.138").gridfs_example
fs = gridfs.GridFS(db)
a = fs.put("hello world")
fs.get(a).read()

b = fs.put(fs.get(a), filename="myfile.txt", bar="baz", imptag="new")
out = fs.get(b)
out.read()
out.bar
out.imptag
out.filename
